home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / hisoft / const.lha / const / constant-ize.doc < prev    next >
Text File  |  1995-12-19  |  2KB  |  48 lines

  1. ============
  2. Constant-Ize
  3. ============
  4.  
  5. Ultra small program for converting lists of things into constant lists for
  6. HiSoft Basic 2, a bit like enums, but const is much nicer :-)
  7.  
  8. First make a nice list of anything you want to turn into a list of stuff.
  9. This list can contain anything, but make sure it is all valid as variable
  10. names.  You do not need to include any nasty '%' signs.  I really hate
  11. typing them.
  12.  
  13. Then run 'constant-ize <filename>' and a few seconds later you will suddenly
  14. have a couple of new files in the same directory.
  15.  
  16. '<filename>_h.bas' is the real file of usefullness.  It contains the list of
  17. constants you want to include in your program.  You can then do stuff
  18. without remembering tedious stuff like offsets.
  19.  
  20. '<filename>_sub.bas' is a quick subroutine that may come in handy.  I like
  21. loading a string array with the same contents as the constants so I can
  22. print what it is without doing a million 'if' statements.
  23.  
  24. I have included a quick sample about cars.
  25.     <cars>        The source file containing all those interesting
  26.             vehicles 
  27.     <cars_h.bas>    Generated constant files
  28.     <cars_sub.bas>    generated subroutine to load up the cars into an
  29.             array. 
  30.  
  31. I hope you find this program usefull, I know I do a LOT of this sort of
  32. thing, and have been continuously alarmed by the lack of good code
  33. generating utilities for HBasic2.  The only other one I know of at this time
  34. is 'ConvertiILBM' by Massimo Tantignone, which converts iff files into
  35. something more usable.  'aminet/gfx/conv/c_ilbm21.lha'  If you have any cool
  36. code generators, please upload them.  Please send me the url as well !
  37.  
  38.  
  39.  _   _   _        _     _   _     |  Ferengi Rule of Acquisition #202
  40. |_> |_| |_| |\ | |_ |  | | /   |  |  
  41. |_> | \ | | | \| |_ |_ |_| \_  .  |  The justification for profit is profit.
  42.                                   |  
  43.  
  44. Please email me at: Braneloc@mirex.demon.co.uk
  45.                                
  46. Alternative email: Braneloc@draught.demon.co.uk (DraughtFlow BBS,
  47. 01707 328484, free internet email, 9 CD's online, no download limit..)
  48.